# -*- coding: utf-8 -*-
from sqlalchemy import Column, Integer, BigInteger, String, DateTime

from core.database import Base
from core.database import TimestampMixin

class TbRole(Base, TimestampMixin):
    __tablename__ = 'tb_role'

    id = Column(BigInteger, primary_key=True, autoincrement=True, comment ='主键id')
    parent_id = Column(BigInteger, comment ='父级id')
    name =  Column(String(128), comment ='角色名称')
    desc =  Column(String(256), comment ='角色描述')
    status = Column(Integer, default=1, comment ='状态 0:禁用 1:启用') # 0:禁用 1:启用

class TbPermision(Base, TimestampMixin):
    __tablename__ = 'tb_permision'

    id = Column(BigInteger, primary_key=True, comment ='主键id')
    parent_id = Column(BigInteger, comment ='父级id')
    name =  Column(String(128), comment ='权限名称')
    desc =  Column(String(256), comment ='权限描述')
    status = Column(Integer, default=1, comment ='状态 0:禁用 1:启用') # 0:禁用 1:启用
